Skip to content

fix: avoid powershell browser opener on wsl#19

Merged
lusu007 merged 1 commit intomainfrom
fix/wsl-login-browser-open
Apr 29, 2026
Merged

fix: avoid powershell browser opener on wsl#19
lusu007 merged 1 commit intomainfrom
fix/wsl-login-browser-open

Conversation

@lusu007
Copy link
Copy Markdown
Contributor

@lusu007 lusu007 commented Apr 29, 2026

Pull Request

Description

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • ♻️ Refactoring
  • 📚 Documentation
  • 🔧 Chore

Related Issues

  • Fixes #

Testing

  • Unit tests pass
  • Manual testing completed
  • New tests added for new functionality

Checklist

  • I have performed a self-review of my own code
  • Tests have been added/updated and pass (if needed)
  • Documentation has been updated (if needed)

Copilot AI review requested due to automatic review settings April 29, 2026 18:46
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba31aedda1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/browser/open.go Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces an in-repo browser opener to avoid PowerShell-based launchers on WSL (which can emit spurious console-encoding errors), replacing the previous external dependency and wiring the login flow to use it.

Changes:

  • Add internal/browser.OpenURL with OS/WSL-specific opener selection logic (prefers cmd.exe on WSL).
  • Add unit tests covering opener selection on Linux/WSL.
  • Remove github.com/pkg/browser from dependencies and update imports; minor .gitignore update.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
internal/browser/open.go New cross-platform URL opener with WSL-specific behavior.
internal/browser/open_test.go New unit tests validating opener selection logic.
cmd/grounds/commands/login.go Switch login flow to use internal/browser.OpenURL.
go.mod Drop github.com/pkg/browser; promote huh to direct dependency.
go.sum Remove sums associated with dropped deps / tidy.
.gitignore Ignore .codex directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/browser/open.go Outdated
Comment thread internal/browser/open.go
Comment thread internal/browser/open.go Outdated
Comment thread internal/browser/open_test.go
@lusu007 lusu007 force-pushed the fix/wsl-login-browser-open branch from ba31aed to 1b0aeee Compare April 29, 2026 18:57
@lusu007 lusu007 merged commit 93bc212 into main Apr 29, 2026
4 checks passed
@lusu007 lusu007 deleted the fix/wsl-login-browser-open branch April 29, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants